<?php  	
	require_once("includes/header.php");
	require_once("include_dao.php");		
	$arr = DAOFactory::getMovieDAO()->queryAll();
	$dtomovie 	= new Movie();
	
	if (isset($_GET['PkMovie'])and isset($_GET['FKGender']))
			if($_GET['PkMovie'] != ''and $_GET['FKGender'] != '')
		{			
			$pkMovie = $_GET['PkMovie'];
			$fKGender= $_GET['FKGender'];
				$dtomovie = DAOFactory::getMovieDAO()->load($pKMovie);
			$dtomovie = DAOFactory::getMovieDAO()->load($fKGender);
			
		}
?>

<div id="mlist">
    <div id="main"><!-- Slidebox -->              
        <div align="center">
            <?php	
				if(isset($_GET["err"])){
					if ($_GET["err"] != ''){
						echo("<marquee>");
						// Mensajes de error 		
							$msn =  msn_error($_GET["err"]);
							echo($msn);
						// Fin de Mensajes de Error			
						echo("</marquee>");
					}
				}
			?> 
         
			
							
	  <?php
						for($i=0;$i<count($arr);$i++){
							
							$row = $arr[$i];?>
												 	
							
       <form class="form-1" method="post" action="class/core/clsMovie.php">
                
                	<input type="hidden" name="PkMovie" value="<?php echo $row->pKMovie; ?>">
                	   	             
                    
                    <p class="field">
                        <input type="text" name="name" placeholder="Nombre" maxlength="50" value="<?php echo $row->name; ?>">
                        <i class="icon-edit icon-large"></i>
                    </p>
                    
                    <p class="field">
                        <input type="text" name="fKGender" placeholder="Genero" maxlength="50" value="<?php echo $row->fKGender; ?>">
                        <i class="icon-edit icon-large"></i>
                    </p>
                    
                    <p class="field">
          				<input type="text" name="stakeholders" placeholder="Elenco" value="<?php echo $row->stakeholders; ?>">
                        <i class="icon-edit icon-large"></i>
                    </p>
                    
                    <p class="field">
                        <input type="text" name="director" placeholder="Director " maxlength="50" value="<?php echo $row->director ; ?>">
						<i class="icon-edit icon-large"></i>
                    </p>
                    
                    <p class="field">
                        <input type="text" name="format" placeholder="Formato" maxlength="50" value="<?php echo $row->format; ?>">
                        <i class="icon-edit icon-large"></i>
                    </p>
                    
                    <p class="field">
                        <input type="text" name="year" placeholder="Año" maxlength="50" value="<?php echo $row->year; ?>"><i class="icon-edit icon-large"></i>
                            
                        </input>
                        
                        
                        
                        <p class="field">
                        
                              <input type="text" name="rate" placeholder="Velocidad" maxlength="50" value="<?php echo $row->rate; ?>">
                        <i class="icon-edit icon-large"></i>
                    </p>
                    
                    <p class="field">
          				<input type="text" name="price" placeholder="Precio" value="<?php echo $row->price; ?>">
                        <i class="icon-edit icon-large"></i>
                    </p>
                    
                    <p class="field">
                        <input type="text" name="priceRentals" placeholder="Precio de alquiler " maxlength="50" value="<?php echo $row->priceRentals ; ?>">
						<i class="icon-edit icon-large"></i>
                    </p>
                    
                    <p class="field">
                        <input type="text" name="languages" placeholder="Lenguajes" maxlength="50" value="<?php echo $row->languages; ?>">
                        <i class="icon-edit icon-large"></i>
                    </p>
                    
                    <p class="field">
                        <input type="text" name="subtitles" placeholder="Subtitulos" maxlength="50" value="<?php echo $row->subtitles; ?>">
                            
                        </input>
                        <i class="icon-edit icon-large"></i>
                    </p>    
                    
                     <p class="field">
                        <input type="text" name="description" placeholder="Descripcion" maxlength="500" value="<?php echo $row->description; ?>">
                            
                        </input>
                        <i class="icon-edit icon-large"></i>
                    </p>                  
                    
                    <p class="field">
                        <input type="text" name="runtime" placeholder="Tiempo" maxlength="500" value="<?php echo $row->runtime; ?>">
                            
                        </input>
                        <i class="icon-edit icon-large"></i>
                    </p>   
                    
  
                    
                    <p class="submit">
                        <button type="submit" name="submit">
                        	<i class="icon-pencil icon-large"></i>
                        </button>
                    </p>
                </form>                
            
            </br></br>          
         
           

    <?php	}	?>    
     

<?php	require_once("includes/footer.php");	?>